package xinyou.jh.net.npcFell
{
	import xinyou.jh.net.JHReceiver;
	import xinyou.net.SocketConnection;
	/**
	 * 
	 * @author shanxiao
	 * 接收npc好感相关的错误信息
	 * 
	 */
	public class NpcFeelReceiver extends JHReceiver
	{
		public function NpcFeelReceiver(socket:SocketConnection)
		{
			super(socket);
		}
		
		override protected function initCallBack():void
		{
			addCallBack([137,0],errorinfo);
			addCallBack([137,2],getAddFeel);
			addCallBack([137,4],getJieJiao);
			addCallBack([137,6],getFeel);
			addCallBack([137,8],getGiftFeel);
		}
		
		public function errorinfo(result:Object):void
		{
			dispatchEvent(new NpcFeelEvent(NpcFeelEvent.ERROR,result));
		}
		public function getAddFeel(result:Object):void
		{
			dispatchEvent(new NpcFeelEvent(NpcFeelEvent.ADDFEEL,result));
		}
		public function getJieJiao(result:Object):void
		{
			dispatchEvent(new NpcFeelEvent(NpcFeelEvent.JIEJIAO,result));
		}
		public function getFeel(result:Object):void
		{
			dispatchEvent(new NpcFeelEvent(NpcFeelEvent.FEEL,result));
		}
		public function getGiftFeel(result:Object):void
		{
			dispatchEvent(new NpcFeelEvent(NpcFeelEvent.GIFTFEEL,result));
		}
	}
}